<?php

namespace services;

use common\components\Service;

/**
 * Class Application
 *
 * @package services
 * @property \services\api\AccessTokenService $apiAccessToken Api授权key
 * @property \services\member\MemberService $member 会员
 * @property \services\member\AttrService $attr 会员属性
 * @property \services\common\ActionLogService $actionLog 行为日志
 * @property \services\common\ActionBehaviorService $actionBehavior 可被记录的行为
 * @property \services\common\LogService $log 公用日志
 * @property \services\common\IpBlacklistService $ipBlacklist 黑名单
 * @property \services\common\ProvincesServer $provinces 地址库
 * @property \services\common\ConfigService $config 全局设置
 * @property \services\common\AttachmentService $attachment 公用资源
 * @property \services\rbac\RolePermissionService $rolePermission 权限关系
 * @property \services\rbac\UserRoleService $userRole 用户角色
 * @property \services\rbac\RoleService $role 用户角色
 * @property \services\rbac\MenuService $menu 菜单
 * @property \services\rbac\DepartmentService $department 模块
 * @property \services\rbac\ActionService $action 动作
 * @property \services\base\ProjectService $project 项目
 * @property \services\base\ProfessionService $profession 项目
 * @property \services\base\PatientDiseasesService $patientDiseases
 * @property \services\base\BcBodyPartsService $bcBodyParts 半舱311部位
 * @property \services\base\BodyPartsServer $bodyParts 身体部位
 * @property \services\clinic\ClinicService $clinic 诊室
 * @property \services\clinic\ProjectService $clinicProject 治疗项目
 * @property \services\clinic\ProjectBindService $clinicProjectBind 治疗项目
 * @property \services\clinic\TreatmentRoomService $clinicTreatmentRoom 治疗室
 * @property \services\clinic\TreatmentDetailService $clinicTreatmentDetail 用户治疗详情表
 * @property \services\clinic\UserSurplusService $clinicUserSurplus 用户治疗剩余量
 * @property \services\clinic\UserTreatmentService $clinicUserTreatment 用户治疗信息
 * @property \services\clinic\UserTreatmentDetailService $clinicUserTreatmentDetail 用户治疗项目明细
 * @property \services\clinic\RelationKefuService $clinicRelationKefu 用户治疗项目
 * @property \services\patient\UserService $patientUser 患者
 * @property \services\patient\TagsService $patientTags 患者标签
 * @property \services\patient\BodyPartsService $patientBodyParts 患者标签
 * @property \services\patient\OperateLogService $patientOperateLog 操作日志
 * @property \services\patient\CallbackService $patientCallback 回访列表
 * @property \services\patient\MedicalAuxiliaryService $patientMedicalAuxiliary 病历辅助列表
 * @property \services\patient\MedicalRecordsService $patientMedicalRecords 病历
 * @property \services\patient\ClinicImgService $patientClinicImg 治疗图片
 * @property \services\patient\ConsumptionService $patientConsumption 消费信息
 * @property \services\patient\ConsumptionDetailService $patientConsumptionDetail 消费明细
 * @property \services\patient\AllocationRecordService $patientAllocationRecord 新增患者
 * @property \services\marketing\SourceChannelService $marketingSourceChannel 来源渠道
 * @property \services\marketing\OutpatientTypeService $marketingOutpatientType 就诊类型
 * @property \services\marketing\EffectTypeService $marketingEffectType 效果类型
 * @property \services\marketing\RiskTypeService $marketingRiskType 风控类型
 * @property \services\marketing\ClinicAssessService $marketingClinicAssess 诊疗评估类型
 * @property \services\marketing\TagsService $marketingTags 标签
 * @property \services\marketing\TagsGroupService $marketingTagsGroup 标签组
 * @property \services\marketing\CallbackStatusService $marketingCallbackStatus 回访状态
 * @property \services\common\ExcelService $excel  excel 导入
 * @property \services\clinic\TreatmentManageService $clinicTreatmentManage 诊疗管理
 * @property \services\oss\ImgRecordService $ossImgRecord 图片下载记录
 * @property \services\statistics\CallbackReportService $statisticsCallbackReport 回访报表
 * @property \services\clinic\TreatmentPatientService $clinicTreatmentPatient 治疗患者列表
 * @property \services\statistics\ManagementReportService $statisticsManagementReport 经营报表
 * @property \services\statistics\ComplexReportService $complexReport 综合报表
 * @property \services\statistics\MonthNumReportService $monthNumReport 科室病人月就诊次数人数汇总表
 * @property \services\statistics\PerfectionReportService $perfectionReport 完善度报表
 * @property \services\statistics\FollowReportService $followReport 跟进列表
 * @property \services\rbac\ModuleService $module 模块
 * @property \services\export\LogService $exportLog 导出日志
 */
class Application extends Service
{
    /**
     * @var array
     */
    public $childService = [
        'apiAccessToken' => [
            'class' => 'services\api\AccessTokenService',
            'cache' => false, // 启用缓存到缓存读取用户信息
            'timeout' => 720, // 缓存过期时间，单位秒
        ],

        /** ------ 用户 ------ **/
        'member' => 'services\member\MemberService',
        'attr' => 'services\member\AttrService',

        /** ------ 公用部分 ------ **/
        'actionLog' => 'services\common\ActionLogService',
        'actionBehavior' => 'services\common\ActionBehaviorService',
        'ipBlacklist' => 'services\common\IpBlacklistService',
        'provinces' => 'services\common\ProvincesServer',
        'config' => 'services\common\ConfigService',
        'excel' => 'services\common\ExcelService',
        'attachment' => 'services\common\AttachmentService',

        /** ------ 基础 ------ **/
        'project' => 'services\base\ProjectService',// 项目
        'bcBodyParts' => 'services\base\BcBodyPartsService',// 半舱311部位
        'bodyParts' => 'services\base\BodyPartsServer',// 患者部位
        'profession' => 'services\base\ProfessionService', // 岗位管理
        'patientDiseases' => 'services\base\PatientDiseasesService', // 病种管理


        'log' => [
            'class' => 'services\common\LogService',
            'queueSwitch' => false, // 是否丢进队列
            'exceptCode' => [403] // 除了数组内的状态码不记录，其他按照配置记录
        ],

        /** ------ 权限 ------ **/
        'rolePermission' => 'services\rbac\RolePermissionService',
        'userRole' => 'services\rbac\UserRoleService',
        'role' => 'services\rbac\RoleService',
        'menu' => 'services\rbac\MenuService',
        'action' => 'services\rbac\ActionService',
        'department' => 'services\rbac\DepartmentService',
        'module' => 'services\rbac\ModuleService',

        /** ------ 患者 ------ **/
        'patientUser'  => 'services\patient\UserService',
        'patientTags'  => 'services\patient\TagsService',
        'patientBodyParts'  => 'services\patient\BodyPartsService',
        'patientOperateLog'  => 'services\patient\OperateLogService',
        'patientCallback'  => 'services\patient\CallbackService',
        'patientMedicalAuxiliary'  => 'services\patient\MedicalAuxiliaryService',
        'patientMedicalRecords'  => 'services\patient\MedicalRecordsService',
        'patientClinicImg'  => 'services\patient\ClinicImgService',
        'patientConsumption'  => 'services\patient\ConsumptionService',
        'patientConsumptionDetail'  => 'services\patient\ConsumptionDetailService',
        'patientAllocationRecord'  => 'services\patient\AllocationRecordService',

        /** ------ 门诊设置 ------ **/
        'clinic'  => 'services\clinic\ClinicService',
        'clinicProject'  => 'services\clinic\ProjectService',
        'clinicProjectBind'  => 'services\clinic\ProjectBindService',
        'clinicTreatmentRoom'  => 'services\clinic\TreatmentRoomService',
        //'clinicTreatment'  => 'services\clinic\TreatmentService',
        'clinicTreatmentDetail'  => 'services\clinic\TreatmentDetailService',
        'clinicUserSurplus'  => 'services\clinic\UserSurplusService',
        'clinicUserTreatment'  => 'services\clinic\UserTreatmentService',
        'clinicUserTreatmentDetail'  => 'services\clinic\UserTreatmentDetailService',
        //'clinicUserTreatmentProject'  => 'services\clinic\UserTreatmentProjectService',
        'clinicTreatmentManage' => 'services\clinic\TreatmentManageService',
        'clinicRelationKefu' => 'services\clinic\RelationKefuService',
        'clinicTreatmentPatient' => 'services\clinic\TreatmentPatientService',


        /** ------ 营销设置 ------ **/
        'marketingSourceChannel'  => 'services\marketing\SourceChannelService',
        'marketingOutpatientType'  => 'services\marketing\OutpatientTypeService',
        'marketingEffectType'  => 'services\marketing\EffectTypeService',
        'marketingRiskType'  => 'services\marketing\RiskTypeService',
        'marketingClinicAssess'  => 'services\marketing\ClinicAssessService',
        'marketingTags'  => 'services\marketing\TagsService',
        'marketingTagsGroup'  => 'services\marketing\TagsGroupService',
        'marketingCallbackStatus'  => 'services\marketing\CallbackStatusService',

        /** ------ Oss ------ **/
        'ossImgRecord'  => 'services\oss\ImgRecordService',

        /** ------ 回访报表 ------ **/
        'statisticsCallbackReport'  => 'services\statistics\CallbackReportService',

        /** ------ 经营报表 ------ **/
        'statisticsManagementReport'  => 'services\statistics\ManagementReportService',
        'perfectionReport'  => 'services\statistics\PerfectionReportService', // 完善度报表

        /** ------ 综合报表 ------ **/
        'complexReport'  => 'services\statistics\ComplexReportService',
        'monthNumReport'  => 'services\statistics\MonthNumReportService',// 科室病人月就诊次数人数汇总表

        /** ------ 跟进列表 ------ **/
        'followReport' => 'services\statistics\FollowReportService',

        /** ------ 导出日志 ------ **/
        'exportLog' => 'services\export\LogService',
    ];
}
